package com.foreknow.elm.dao;

import com.foreknow.elm.po.DeliveryAddress;

import java.util.List;

public interface DeliveryAddressDao {
    /**
     * 根据userId查询送货地址的列表
     * @param userId
     * @return
     * @throws Exception
     */
    public List<DeliveryAddress> listDeliveryAddressByUserId(String userId) throws Exception;

    /**
     * 添加送货的地址信息
     * @param deliveryAddress
     * @return
     * @throws Exception
     */
    public int saveDeliveryAddress(DeliveryAddress deliveryAddress) throws Exception;

    /**
     * 根据送货地址编号查询送货地址
     * @param daId
     * @return
     * @throws Exception
     */
    public DeliveryAddress getDeliveryAddressById(Integer daId)throws Exception;

    /**
     * 根据送货地址编号更新送货地址信息
     * @param deliveryAddress
     * @return
     * @throws Exception
     */
    public int updateDeliveryAddress(DeliveryAddress deliveryAddress) throws Exception;

    /**
     * 根据送货地址编号删除一条记录
     * @param daId
     * @return
     * @throws Exception
     */
    public int removeDeliveryAddress(Integer daId) throws Exception;


}
